import { FormSchema } from "/@/components/Form";

export const leardWorkFormSchema: FormSchema[] = [
  {
    field: "className",
    label: "实习班级",
    component: "Input",
    colProps: {
      span: 11,
    },
  },
  {
    field: "studentAmount",
    label: "学生人数",
    component: "InputNumber",
    colProps: {
      span: 11,
      offset: 2,
    },
    rules: [
      {
        type: "number",
        validator: async (_rule, value) => {
          if (!value) {
            return Promise.resolve();
          }
          if (value < 0 || value > 100 || value % 1 != 0) {
            return Promise.reject("请输入 0-100 之间的一个整数");
          }
          return Promise.resolve();
        },
        trigger: "change",
      },
    ],
  },
  {
    field: "baseInfo",
    label: "基本情况",
    component: "InputTextArea",
    componentProps: {
      rows: 4,
    },
  },
  {
    field: "dailyWork",
    label: "日常工作",
    component: "InputTextArea",
    componentProps: {
      rows: 4,
    },
  },
  {
    field: "workPlan",
    label: "班主任工作计划",
    component: "InputTextArea",
    componentProps: {
      rows: 4,
    },
  },
  {
    field: "educationPlan",
    label: "班级综合育人课外活动设计实施方案",
    component: "InputTextArea",
    componentProps: {
      rows: 4,
    },
  },
  {
    field: "classActivity",
    label: "独立开展班级活动记录",
    component: "InputTextArea",
    componentProps: {
      rows: 4,
    },
  },
];

export const lessonPlanFormSchema: FormSchema[] = [
  {
    field: "planId",
    label: "id",
    component: "Input",
    show: false,
  },
  {
    field: "startDate",
    label: "教案撰写时间",
    component: "DatePicker",
    required: true,
    colProps: {
      span: 12,
    },
    componentProps: {
      valueFormat: "YYYY-MM-DD",
    },
  },
  {
    field: "subjectName",
    label: "课题名称",
    component: "Input",
    required: true,
    colProps: {
      span: 12,
    },
  },
  {
    field: "subjectType",
    label: "课题类型",
    component: "Input",
    colProps: {
      span: 24,
    },
  },
  {
    field: "teachingProcess",
    label: "教学过程",
    component: "InputTextArea",
    colProps: {
      span: 24,
    },
    componentProps: {
      rows: 5,
    },
  },
  {
    field: "designIdea",
    label: "课程设计思路",
    component: "InputTextArea",
    colProps: {
      span: 24,
    },
    componentProps: {
      rows: 5,
    },
  },
  {
    field: "personalSummary",
    label: "个人反思与总结",
    component: "InputTextArea",
    colProps: {
      span: 24,
    },
    componentProps: {
      rows: 5,
    },
  },
];

export const lectureNoteFormSchema: FormSchema[] = [
  {
    field: "noteId",
    label: "id",
    component: "Input",
    show: false,
  },
  {
    field: "startDate",
    label: "听课时间",
    component: "DatePicker",
    required: true,
    colProps: {
      span: 12,
    },
    componentProps: {
      valueFormat: "YYYY-MM-DD",
    },
  },
  {
    field: "className",
    label: "听课班级",
    component: "Input",
    colProps: {
      span: 12,
    },
  },
  {
    field: "lectureContent",
    label: "听课内容",
    component: "Input",
    required: true,
  },
  {
    field: "teacherName",
    label: "任课教师",
    component: "Input",
    colProps: {
      span: 12,
    },
  },
  {
    field: "lectureType",
    label: "课程类型",
    component: "Input",
    colProps: {
      span: 12,
    },
  },
  {
    field: "teachingProcess",
    label: "教学过程",
    component: "InputTextArea",
    componentProps: {
      rows: 5,
    },
  },
  {
    field: "experience",
    label: "听课体会与建议",
    component: "InputTextArea",
    componentProps: {
      rows: 5,
    },
  },
  {
    field: "personalSummary",
    label: "个人反思与总结",
    component: "InputTextArea",
    componentProps: {
      rows: 5,
    },
  },
];

export const teachingStudyFormSchema: FormSchema[] = [
  {
    field: "studyId",
    label: "id",
    component: "Input",
    show: false,
  },
  {
    field: "startDate",
    label: "教研开始时间",
    component: "DatePicker",
    required: true,
    componentProps: {
      valueFormat: "YYYY-MM-DD",
    },
  },
  {
    field: "type",
    label: "教研方式",
    component: "Input",
  },
  {
    field: "content",
    label: "教研内容",
    component: "Input",
    required: true,
  },
  {
    field: "teachingProcess",
    label: "教学过程",
    component: "InputTextArea",
    componentProps: {
      rows: 5,
    },
  },
  {
    field: "designIdea",
    label: "教研思路",
    component: "InputTextArea",
    componentProps: {
      rows: 5,
    },
  },
  {
    field: "personalSummary",
    label: "个人反思与总结",
    component: "InputTextArea",
    componentProps: {
      rows: 5,
    },
  },
];

export const teachingRecordFormSchema: FormSchema[] = [
  {
    field: "recordId",
    label: "id",
    component: "Input",
    show: false,
  },
  {
    field: "lessonDate",
    label: "讲试时间",
    component: "DatePicker",
    required: true,
    componentProps: {
      valueFormat: "YYYY-MM-DD",
    },
  },
  {
    field: "place",
    label: "讲试地点",
    component: "Input",
  },
];

export const personalSummaryFormSchema: FormSchema[] = [
  {
    label: "个人总结",
    field: "personalSummary",
    component: "InputTextArea",
    required: true,
    componentProps: {
      rows: 10,
    },
  },
];
